import HomeGary from '@/assets/demoIcon/home.png';
import HomeBlue from '@/assets/demoIcon/home1.png';
import List from '@/assets/demoIcon/list.png';
import ListA from '@/assets/demoIcon/list1.png';
import Manage from '@/assets/demoIcon/project.png';
import ManageA from '@/assets/demoIcon/projectA.png';
import diagnosisGroup from '@/assets/demoIcon/diagnosisGroup.png';
import diagnosisGroupA from '@/assets/demoIcon/diagnosisGroupA.png';

import { urlPrefix } from '@/utils/http';

// import { initDingH5RemoteDebug } from "dingtalk-h5-remote-debug";
// initDingH5RemoteDebug();

import type {
  NavBarListItem,
  NavBarProps,
  ResponseError,
  TabBarListItem,
  TabBarProps,
  TitleListItem,
} from 'alita';
// import {ACCESSTOKEN } from '@/utils/authorize';
// export const  urlPrefix = `http://localhost:8080`;
// const urlPrefix = 'http://billschen.com';

export const request = {
  // prefix: 'http://billschen.com',
  //prefix: 'http://pingfang.billschen.com',
  prefix: urlPrefix,
  // prefix: 'http://localhost:8080',
  // prefix: urlPrefix,
  method: 'get',
  mode: 'cors',
  cache: 'no-cache',
  credentials: 'same-origin',
  // headers: {
  //   'Authorization': `Bearer ${localStorage.getItem(ACCESSTOKEN) || 'ddddd'}`
  // },
  redirect: 'follow',
  errorHandler: (error: ResponseError) => {
    // 集中处理错误
    console.log(11111111);
    console.log(error);
  },
};

const titleList: TitleListItem[] = [];
const navList: NavBarListItem[] = [
  {
    pagePath: '/study/drag-drop-layout',
    navBar: {
      hideNavBar: true,
    },
  },

  {
    pagePath: '/study/search',
    navBar: {
      hideNavBar: true,
    },
  },

  {
    pagePath: '/backend/myself',
    navBar: {
      hideNavBar: true,
    },
  },
  {
    pagePath: '/',
    navBar: {
      hideNavBar: true,
    },
  },
  {
    pagePath: '/diagnosis-group/search',
    navBar: {
      hideNavBar: true,
    },
  },
];
const navBar: NavBarProps = {
  navList,
  fixed: false,
  hideNavBar:true,
  onLeftClick: () => {
    // router.goBack();
  },
};
const tabList: TabBarListItem[] = [
  {
    pagePath: '/',
    text: '检查单',
    iconPath: HomeGary,
    selectedIconPath: HomeBlue,
    title: '检查单',
    iconSize: '',
    badge: '',
  },
  {
    pagePath: '/diagnosis-group/search',
    text: '诊断组',
    iconPath: diagnosisGroup,
    selectedIconPath: diagnosisGroupA,
    title: '诊断组',
    iconSize: '',
    badge: '',
  },
  {
    pagePath: '/backend/management',
    text: '管理',
    iconPath: Manage,
    selectedIconPath: ManageA,
    title: '管理',
    iconSize: '',
    badge: '',
  },
];

const tabBar: TabBarProps = {
  color: `#999999`,
  selectedColor: '#00A0FF',
  borderStyle: 'white',
  position: 'bottom',
  list: tabList,
};

export const mobileLayout = {
  // documentTitle: 'XY系统',
  navBar,
  tabBar,
  titleList,
};
